Problem: Find the number of functions $f(n),$ taking the integers to the integers, such that
\[f(a + b) + f(ab) = f(a) f(b) + 1\]for all integers $a$ and $b.$
Solution: Setting $a = b = 0,$ we get
\[2f(0) = f(0)^2 + 1.\]Then $f(0)^2 - 2f(0) + 1 = (f(0) - 1)^ 2 = 0,$ so $f(0) = 1.$

Setting $a = 1$ and $b = -1,$ we get
\[f(0) + f(-1) = f(1) f(-1) + 1,\]so $f(-1) (f(1) - 1) = 0.$  This means either $f(-1) = 0$ or $f(1) = 1.$

First, we look at the case where $f(1) = 1.$  Setting $b = 1,$ we get
\[f(a + 1) + f(a) = f(a) + 1,\]so $f(a + 1) = 1.$  This means $f(n) = 1$ for all integers $n.$

Next, we look at the case where $f(-1) = 0.$  Setting $a = b = -1,$ we get
\[f(-2) + f(1) = f(-1)^2 + 1 = 1.\]Setting $a = 1$ and $b = -2,$ we get
\[f(-1) + f(-2) = f(1) f(-2) + 1,\]which simplifies to $f(-2) = f(1) f(-2) + 1.$  Substituting $f(-2) = 1 - f(1),$ we get
\[1 - f(1) = f(1) (1 - f(1)) + 1,\]which simplifies to $f(1)^2 - 2f(1) = f(1) (f(1) - 2) = 0.$  Hence, either $f(1) = 0$ or $f(1) = 2.$

First, we look at the case where $f(1) = 0.$  Setting $b = 1,$ we get
\[f(a + 1) + f(a) = 1,\]so $f(a + 1) = 1 - f(a).$  This means $f(n)$ is 1 if $n$ is even, and 0 if $n$ is odd.

Next, we look at the case where $f(1) = 2.$  Setting $b = 1,$ we get
\[f(a + 1) + f(a) = 2f(a) + 1,\]so $f(a + 1) = f(a) + 1.$  Combined with $f(1) = 2,$ this means $f(n) = n + 1$ for all $n.$

Thus, there a total of $\boxed{3}$ functions: $f(n) = 1$ for all $n,$ $f(n) = n + 1$ for all $n,$ and
\[f(n) = \left\{
\begin{array}{cl}
1 & \text{if $n$ is even}, \\
0 & \text{if $n$ is odd}.
\end{array}
\right.\]We check that all three functions work.